<template>
  <div>
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <Recommend></Recommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for='floor in floorList' :key='floor.id' :floorObj='floor'></Floor>
    <Brand></Brand>
  </div>
</template>

<script>
import ListContainer from '@/views/Home/ListContainer'
import Recommend from '@/views/Home/Recommend'
import Rank from '@/views/Home/Rank'
import Like from '@/views/Home/Like'
import Floor from '@/views/Home/Floor'
import Brand from '@/views/Home/Brand'

import { mapState } from 'vuex'
export default {
  // 组件名称
  name: 'Home',
  // 组件参数 接收来自父组件的数据
  props: {},
  // 局部注册的组件
  components: { ListContainer, Recommend, Rank, Like, Floor, Brand },
  // 组件状态值
  data() {
    return {}
  },
  // 计算属性
  computed: {
    ...mapState('home', ['floorList'])
  },
  // 侦听器
  watch: {},
  // 组件方法
  methods: {},
  created() {
    this.$store.dispatch('user/getUserInfo')
  }
}
</script>

<style lang= 'less' scoped>
</style>
